﻿using System;
using System.Collections.Generic;
using System.Web;
using AspNetCs.Config;
using System.Text;
using AspNetCs.Common;
using System.Configuration;
using AspNetCs.Bll;
using AspNetCs.Model;
using AspNetCs.Enumerations.Channel_Enum;
using AspNetCs.IDAL;
using System.Data;
using AspNetCs.Enumerations.TrueOrFalseEnum;
using AspNetCs.Enumerations.User_Enum;


/// <summary>
///网站前台页面常用基类
/// </summary>
public class BasePage : System.Web.UI.Page
{




    /// <summary>
    /// 用户登录后的信息
    /// </summary>
    public IUserSaveType_Property Base_GetLoginInfo = SaveType_Factory.Create();

    /// <summary>
    /// 随机数生成的长度[主要用于馆号]
    /// </summary>
    public int RndLen = 8;

    /// <summary>
    /// 当前页面路径
    /// </summary>
    public string Base_CurrPath = configInfo.SiteTitle;



    /// <summary>
    /// 系统缓存
    /// </summary>
    public Caches SetCache = new Caches();
    /// <summary>
    /// 用户系统配置
    /// </summary>
    public static SiteConfigInfo configInfo = new SiteConfigInfo();
    /// <summary>
    /// 字符串
    /// </summary>
    public StringBuilder strBuilder = new StringBuilder();


    /// <summary>
    /// 系统缓存前缀
    /// </summary>
    public string SiteCachePrefix
    {
        get
        {
            return BaseConfig.GetBaseConfig().CachePrefix + StringHelper.ReadConfig("SystemCache");
        }
    }


    public BasePage()
    {

        configInfo = System_Lable.SystemGetCache;
    }

    /// <summary>
    /// 清空系统缓存
    /// </summary>
    public void RefreshSystemCache()
    {
        System_Lable.RefreshSystemCache();
    }

    #region 提示信息
    /// <summary>
    /// 操作结果提示信息
    /// </summary>
    /// <param name="ReUrl"></param>
    /// <param name="Msg"></param>
    public void ResultStr(string ReUrl, string Msg, bool End)
    {
        string JsMsg = "";
        if (Msg != "")
        {
            JsMsg += "alert('" + Msg + "');";
        }
        if (ReUrl != "")
        {
            JsMsg += "location.href='" + ReUrl + "';";
        }




        Response.Write("<script>" + JsMsg + "</script>");
        if (End == true)
        {
            Response.End();
        }
    }

    /// <summary>
    /// 操作结果提示信息，并结束
    /// </summary>
    /// <param name="ReUrl"></param>
    /// <param name="Msg"></param>
    public void ResultStr(string ReUrl, string Msg)
    {
        ResultStr(ReUrl, Msg, true);
    }
    /// <summary>
    /// 消息提示框
    /// </summary>
    /// <param name="key"></param>
    /// <param name="Message"></param>
    public void showMessage(string key, string Message)
    {
        Response.Write("<script>alert('" + Message + "');</script>");
    }

    /// <summary>
    /// 提示消息，返回上一级
    /// </summary>
    /// <param name="Msg"></param>
    public void ShowMsgBack(string Msg)
    {
        Response.Write(string.Format("<script>alert('{0}');history.back();</script>", Msg));
    }

    public void ShowMsgBackParent(string Msg, string parentUrl)
    {
        Response.Write(string.Format("<script>alert('{0}');parent.window.location.href='" + parentUrl + "';</script>", Msg));
    }

    #endregion



    /// <summary>
    /// 对链接地址添加，更改后辍
    /// </summary>
    /// <param name="url">链接地址</param>
    /// <param name="Suffix">后辍[.htm]</param>
    /// <returns></returns>

    public string AddSuffix(string url, string Suffix)
    {
        url = url.ToLower();
        if (url == "") return "";

        int StrNum = url.LastIndexOf(".");
        if (StrNum >= 0)
        {
            url = url.Substring(0, StrNum);
        }
        url = url + Suffix;
        return url;
    }
    /// <summary>
    /// 对链接地址添加，更改后辍
    /// </summary>
    /// <param name="url">链接地址</param>
    /// <returns></returns>
    public string AddSuffix(string url)
    {
        return AddSuffix(url, ReadConfig("LinkConfig"));
    }





    /// <summary>
    /// 读取WEB.Config的值
    /// </summary>
    /// <param name="Config_key">web.Config的键值</param>
    /// <returns></returns>
    public string ReadConfig(string Config_key)
    {
        try
        {
            return ConfigurationManager.AppSettings[Config_key].ToString();
        }
        catch
        {
            return "";
        }
    }

    /// <summary>
    /// 检查用户是否退出
    /// </summary>
    /// <param name="Url">返回URL</param>
    /// <param name="Msg">提示信息</param>
    /// <param name="IsEnd">当前位置是否终止</param>
    public void CheckUserExit(string Url, string Msg, bool IsEnd)
    {
        IUserSaveType_Property Property = SaveType_Factory.Create();
        if (Property.GetUserID == 0)
        {
            ResultStr(Url, Msg, IsEnd);
        }
    }

    public Users_Model Base_GetUserInfo
    {
        get
        {
            Users_Model md = new Users_Model();
            if (Base_GetLoginInfo.GetUserID != 0)
            {
                md = new Users().GetModel(Base_GetLoginInfo.GetUserID);
            }
            return md;
        }
    }


    /// <summary>
    /// 获取用户上传目录
    /// </summary>
    public string Base_GetUserUpFolder
    {
        get
        {
            string Result = configInfo.InstallDir + configInfo.UpFolder;
            if (Base_GetLoginInfo.GetUserID > 0)
            {
                Result += Base_GetLoginInfo.GetUserID + "/";
            }
            return Result;
        }

    }


    /// <summary>
    /// 连接地址链接
    /// </summary>
    /// <returns></returns>
    public string Url_DomainChange(string Numid, string ChannelId)
    {
        string Demain = Request.Url.DnsSafeHost.ToString().Trim();

        Demain = Request.Url.Host.ToString().Trim();

        string Result = DnsRequest.UrlDomainChange(Demain, Numid, ChannelId);
        return Result;
    }










    #region  网站公用UI
    /// <summary>
    /// AJAX检查用户在线,离线
    /// </summary>
    /// <returns></returns>
    public virtual string UI_CheckUserOnline()
    {
        StringBuilder stb = new StringBuilder();
        try
        {
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/jquery.js\" type=\"text/javascript\"></script>");
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/jsConfig.Aspx\" type=\"text/javascript\"></script>");
        }
        finally
        {


        }
        return stb.ToString();
    }


    /// <summary>
    ///  网站界面的Head
    /// </summary>
    /// <param name="Title">标题</param>
    /// <param name="key">关键字</param>
    /// <param name="Desc">描述</param>
    /// <returns></returns>
    public virtual string UI_Head(string Title, string key, string Desc, int city, int pro)
    {

        string AgentTitle = Title;//Logo地址


        if (city != 0 && pro != 0)
        {
            PartSiteConfigModel AgentMd = new PartSiteConfigBLL().GetModel(pro, city);
            //AgentModel AgentMd = Agen_BLL.CreateNew.GetModel(" LoginPro=" + pro + " and LoginCity=" + city + " ");
            AgentTitle = AgentMd.MangerName;
        }


        StringBuilder stb = new StringBuilder();
        try
        {

            if (Title == "") { Title = configInfo.SiteTitle; }
            if (key == "") { key = configInfo.Meta_Keywords; }
            if (Desc == "") { Desc = configInfo.Meta_Description; }

            stb.AppendLine("<link href=\"" + configInfo.InstallDir + "Css/Index.css\" rel=\"stylesheet\" type=\"text/css\" />");
            stb.AppendLine("<title>" + AgentTitle + "</title>");
            stb.AppendLine("<meta name=\"Author\" content=\"Mr.Wang AspNetCs.Com\">");
            stb.AppendLine("<meta name=\"description\" content=\"" + key + "\" />");
            stb.AppendLine("<meta name=\"keywords\" content=\"" + Desc + "\" />");
            #region JS中使用的路径
            stb.AppendLine("<script type=\"text/javascript\">");
            stb.AppendLine("var JsPath=\"" + configInfo.InstallDir + "\"");
            stb.AppendLine("//JsPath=JS中使用的网站路径");
            stb.AppendLine("</script>");

            #endregion
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/jquery.js\" type=\"text/javascript\"></script>");
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/AC_RunActiveContent.js\" type=\"text/javascript\"></script>");
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/public.js\" type=\"text/javascript\"></script>");



        }
        catch
        {

        }




        return stb.ToString();
    }
    /// <summary>
    /// 网站界面的Head
    /// </summary>
    /// <returns></returns>
    public virtual string UI_Head()
    {
        return UI_Head(configInfo.SiteTitle, configInfo.Meta_Keywords, configInfo.Meta_Description, 0, 0);
    }

    /// <summary>
    /// 网站界面的Head
    /// </summary>
    /// <returns></returns>
    public virtual string UI_Head(string title, string key, string Desc)
    {
        return UI_Head(configInfo.SiteTitle, configInfo.Meta_Keywords, configInfo.Meta_Description, 0, 0);
    }

    /// <summary>
    /// 网站界面的顶部
    /// </summary>
    /// <returns></returns>
    public virtual string UI_TopControl(bool IsAgentList, int city, int pro)
    {

        string LogoImg = "images/Logo.jpg";//Logo地址



        if (city != 0 && pro != 0)
        {
            PartSiteConfigModel AgentMd = new PartSiteConfigBLL().GetModel(pro, city);
            //AgentModel AgentMd = Agen_BLL.CreateNew.GetModel(" LoginPro=" + pro + " and LoginCity=" + city + " ");
            LogoImg = AgentMd.LogoURL;
        }

        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"TopBar\"><img src=\"" + configInfo.InstallDir + "images/img_r1_c1.jpg\" /></div>");
        stb.AppendLine("<div class=\"TopLogo\">");
        stb.AppendLine(" <div id=\"logo\"><img src='" + configInfo.InstallDir + LogoImg + "'></div>");
        stb.AppendLine("<div id=\"LogoRightText\"><a href=\"" + configInfo.SiteUrl + "\">返回主站</a> | <a href=\"" + configInfo.InstallDir + "Guest/Default.aspx\">网站留言</a>&nbsp;|&nbsp;<a href='PerpetualCalendar.Aspx' target='_blank' >万年历</a>&nbsp;|&nbsp;<a href=\"" + configInfo.InstallDir + "ContactUs.aspx\">联系我们</a> |  <a href=\"" + configInfo.InstallDir + "Users/Login.aspx\">会员登录</a> | <span onClick=\"var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('" + configInfo.SiteUrl + "');\" style=\"CURSOR: hand\">设为首页</span> | <a href=\"javascript:window.external.AddFavorite('" + configInfo.SiteUrl + "','天府国都全球华人最大的免费纪念网|名人纪念馆|网上纪念|网上祭祀|网上悼念|缅怀先烈|祭祀网|清明网')\">加入收藏</a> <br />&nbsp;&nbsp;<span style='color:#B40202'>今天是:" + DateTime.Now.ToString("yyyy年M月d日") + " " + GetTodayWeek() + "</span>&nbsp;&nbsp;&nbsp;&nbsp;" + GetUserName() + "  </div>");
        stb.AppendLine("</div>");

        stb.AppendLine("<div  class=\"topbanner\" >");
        stb.AppendLine("<script type=\"text/javascript\">");
        stb.AppendLine("AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1003','height','235','src','" + configInfo.InstallDir + "images/top','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','" + configInfo.InstallDir + "images/top' ); //end AC code");
        stb.AppendLine("</script><noscript><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\" width=\"1003\" height=\"235\">");
        stb.AppendLine("<param name=\"movie\" value=\"" + configInfo.InstallDir + "images/top.swf\" />");
        stb.AppendLine("<param name=\"quality\" value=\"high\" />");
        stb.AppendLine("<embed src=\"" + configInfo.InstallDir + "images/top.swf\" quality=\"high\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"1003\" height=\"235\"></embed>");
        stb.AppendLine("</object>");
        stb.AppendLine("</noscript>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"topbanner\"><img src=\"" + configInfo.InstallDir + "images/img_r4_c1.jpg\" border=\"0\" usemap=\"#Mapdht\" /></div>");
        stb.AppendLine("<map name=\"Mapdht\" id=\"Mapdht\">");
        stb.AppendLine("<area shape=\"rect\" coords=\"874,8,939,30\" href=\"/bbs/\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"790,8,855,30\" href=\"" + configInfo.InstallDir + "OnehundredSurname.Aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"699,8,764,30\" href=\"" + configInfo.InstallDir + "Cemetery_List.Aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"609,8,674,30\" href=\"" + configInfo.InstallDir + "WelfareMemorialList.aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"517,8,582,30\" href=\"" + configInfo.InstallDir + "AncestralHallList.aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"424,8,489,30\" href=\"" + configInfo.InstallDir + "NetMuList.aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"336,8,401,30\" href=\"" + configInfo.InstallDir + "MemorialList.aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"246,8,311,30\" href=\"" + configInfo.InstallDir + "CustomerSeviceList_11.aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"153,8,218,30\" href=\"" + configInfo.InstallDir + "Users/Create_memorial.Aspx\" />");
        stb.AppendLine("<area shape=\"rect\" coords=\"62,7,127,29\" href=\"" + configInfo.InstallDir + "Default.aspx\" />");
        stb.AppendLine("</map>");
        if (IsAgentList == true)
        {
            stb.Append(UI_AgentList());
        }
        return stb.ToString();
    }

    public virtual string UI_TopControl(bool IsAgentList)
    {
        return UI_TopControl(IsAgentList, 0, 0);
    }


    public static string CaculateWeekDay(int y, int m, int d)
    {
        if (m == 1) m = 13;
        if (m == 2) m = 14;
        int week = (d + 2 * m + 3 * (m + 1) / 5 + y + y / 4 - y / 100 + y / 400) % 7 + 1;
        string weekstr = "";
        switch (week)
        {
            case 1: weekstr = "星期一"; break;
            case 2: weekstr = "星期二"; break;
            case 3: weekstr = "星期三"; break;
            case 4: weekstr = "星期四"; break;
            case 5: weekstr = "星期五"; break;
            case 6: weekstr = "星期六"; break;
            case 7: weekstr = "星期日"; break;
        }

        return weekstr;
    }

    public string GetTodayWeek()
    {
        DateTime date = DateTime.Now;
        int week = 1;
        string weekstr = "星期一";
        week = (int)date.DayOfWeek;
        switch (week)
        {
            case 1: weekstr = "星期一"; break;
            case 2: weekstr = "星期二"; break;
            case 3: weekstr = "星期三"; break;
            case 4: weekstr = "星期四"; break;
            case 5: weekstr = "星期五"; break;
            case 6: weekstr = "星期六"; break;
            case 7: weekstr = "星期日"; break;
        }

        return weekstr;

    }

    /// <summary>
    /// 获得用户的登录信息
    /// </summary>
    /// <returns></returns>
    public string GetUserName()
    {
        string userName = "您还没有登录!";
        if (Base_GetUserInfo.UserId > 0)
        {
            userName = "您好:<strong>" + Base_GetUserInfo.UserName + "</strong>&nbsp;&nbsp;欢迎登录!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='" + configInfo.InstallDir + "Users/LoginOut.Aspx'><span style='color:#666666'>[注销]</span></a>&nbsp;&nbsp;";
        }
        return userName;
    }

    /// <summary>
    /// 获得分站个数
    /// </summary>
    /// <returns></returns>
    public int GetPartsOfSiteNum()
    {
        DataTable dataTable = new DataTable();
        int count = 0;
        string cmdText = "select count(id) from Agent";
        dataTable = ExcuteSqlTextBLL.GetDataTable(cmdText);
        if (dataTable.Rows.Count > 0)
        {
            count = StringHelper.isNumber_int(dataTable.Rows[0][0].ToString());
        }
        return count;
    }

    /// <summary>
    /// 获得纪念馆个数
    /// </summary>
    /// <returns></returns>
    public int GetMemorialsNum()
    {
        DataTable dataTable = new DataTable();
        int count = 0;
        string cmdText = "select count(id) from memorial";
        dataTable = ExcuteSqlTextBLL.GetDataTable(cmdText);
        if (dataTable.Rows.Count > 0)
        {
            count = StringHelper.isNumber_int(dataTable.Rows[0][0].ToString());
        }
        return count;
    }

    /// <summary>
    /// 网墓个数
    /// </summary>
    /// <returns></returns>
    public int GetNetMuNum()
    {
        DataTable dataTable = new DataTable();
        int count = 0;
        string cmdText = "select count(id) from NetMu";
        dataTable = ExcuteSqlTextBLL.GetDataTable(cmdText);
        if (dataTable.Rows.Count > 0)
        {
            count = StringHelper.isNumber_int(dataTable.Rows[0][0].ToString());
        }
        return count;
    }

    /// <summary>
    /// 获得陵园个数
    /// </summary>
    /// <returns></returns>
    public int GetCemeteryNum()
    {
        DataTable dataTable = new DataTable();
        int count = 0;
        string cmdText = "select count(id) from Cemetery";
        dataTable = ExcuteSqlTextBLL.GetDataTable(cmdText);
        if (dataTable.Rows.Count > 0)
        {
            count = StringHelper.isNumber_int(dataTable.Rows[0][0].ToString());
        }
        return count;
    }

    /// <summary>
    /// 获得宗祠个数
    /// </summary>
    /// <returns></returns>
    public int GetAncestralHallsNum()
    {
        DataTable dataTable = new DataTable();
        int count = 0;
        string cmdText = "select count(id) from AncestralHall";
        dataTable = ExcuteSqlTextBLL.GetDataTable(cmdText);
        if (dataTable.Rows.Count > 0)
        {
            count = StringHelper.isNumber_int(dataTable.Rows[0][0].ToString());
        }
        return count;
    }

    public virtual string UI_TopControl()
    {

        return UI_TopControl(true, 0, 0);
    }





    /// <summary>
    /// 加盟商界面列表
    /// </summary>
    /// <returns></returns>
    public virtual string UI_AgentList()
    {
        Province provi = new Province();
        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"AgentList\">");
        stb.AppendLine("<div class=\"AgentListLeft\"></div>");
        stb.AppendLine("<div class=\"AgentListText\">");
        stb.AppendLine("<ul>");
        DataTable dataTable = new DataTable();
        dataTable = provi.ProvinceList();
        foreach (DataRow row in dataTable.Rows)
        {
            stb.AppendLine("<li><a href='" + BaseConfig.GetSiteInstaDir + "PartsOfSite_" + row["id"].ToString() + ".aspx'>" + row["ClassName"].ToString() + "</a></li>");
        }
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"AgentListRight\"></div>");
        stb.AppendLine("</div>");
        return stb.ToString();
    }

    /// <summary>
    /// 网站底部
    /// </summary>
    /// <returns></returns>
    public virtual string UI_boot()
    {

        return UI_boot(true, true, true);
    }

    /// <summary>
    /// 网站底部
    /// </summary>
    /// <param name="IsQQ">是否包含QQ显示的部份</param>
    /// <param name="IsLink">是否包含友情链接的部份</param>
    /// <param name="IsCheckOnline">是否检查用户在线[true,false]</param>
    /// <returns></returns>
    public virtual string UI_boot(bool IsQQ, bool IsLink, bool IsCheckOnline)
    {
        StringBuilder stb = new StringBuilder();
        stb.Append("<table width=\"1003\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
        stb.Append("<tr>");
        stb.Append("<td align=\"center\" valign=\"top\" style=\"background:#FFFFFF;padding-top:10px;\">");

        if (IsQQ == true)
        {
            stb.Append(UI_boot_QQ());
        }
        if (IsLink == true)
        {
            stb.Append(UI_boot_Link());
        }








        if (IsCheckOnline)
        {
            stb.AppendLine("<script src=\"" + configInfo.InstallDir + "Script/jsConfig.Aspx\" type=\"text/javascript\"></script>");
        }
        string siteName = configInfo.SiteName;
        string email = configInfo.WebmasterEmail;
        string Copyright = StringHelper.ConfigRepalce_Re(configInfo.Copyright);

        stb.AppendLine("<div class=\"topbanner\">");
        stb.AppendLine("<div class=\"bottom_Content\">");
        //stb.Append("<div style=\"width:993px;\"><hr /></div>");
        stb.Append("<hr /><a href=\"AboutUs.aspx\" target=\"_blank\">关于我们 </a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"Declare.aspx\" target=\"_blank\">法律声明</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"" + configInfo.InstallDir + "ContactUs.aspx\" target=\"_blank\"> 联系方式 </a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"http://www.999qm.com/Service.asp\" target=\"_blank\">客户中心</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"SiteGuid.aspx\" target=\"_blank\">网站导航</a>");
        stb.Append("<br>");
        //stb.Append("Copyright Inc. All rights reserved. 中华人民共和国增值电信业务经营许可证编号：<a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\" style=\"font-size:12px;color:#FF0000\">川B2-20070130</a>");
        //// Inc. All rights reserved. 中华人民共和国增值电信业务经营许可证编号：<a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\" style=\"font-size:12px;color:#FF0000\">川B2-20070130</a>
        //stb.Append("<br>");
        //stb.Append(siteName + " 电话：028-84454411 028-81333386 传真：028-84454400 邮箱：" + email);
        //stb.Append("<br>");
        ////stb.Append("总访问量：{$Counter} 人次     当前在线人数：{$OnLineList}人  <a href=\"xkz.jpg\" target=\"_blank\" style=\"font-size:12px;color:#FF0000\">互联网经营ICP许可证</a>");
        //stb.Append("<br>");
        //stb.Append("版权所有：成都归一文化传媒有限公司  <a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\">蜀ICP备：08000668</a>");
        ////成都归一文化传媒有限公司  <a href=\"http://www.miibeian.gov.cn/\" target=\"_blank\">蜀ICP备：08000668</a>
        //stb.Append("<br>");
        //stb.Append("技术支持：归一文化 Desinger by undertaker");
        stb.Append(Copyright);


        stb.Append("</div>");



        stb.Append("</td>");
        stb.Append("</tr>");
        stb.Append("</table>");
        return stb.ToString();
    }





    /// <summary>
    /// 网站底部QQ
    /// </summary>
    /// <returns></returns>
    public virtual string UI_boot_QQ()
    {
        StringBuilder stb = new StringBuilder();

        //stb.AppendLine("<div class=\"topbanner bodyList\" >");
        //stb.AppendLine("<div  class=\"bottom_count_995\">");
        //stb.AppendLine("<div class=\"WebCount_Left\"></div>");
        //stb.AppendLine("<div class=\"WebCount_Center\">");
        //stb.AppendLine("<div class=\"WebCount_QQ_title\">&nbsp;</div>");
        //stb.AppendLine("<div  class=\"WebCount_QQ_List\">asdfasd</div>");
        //stb.AppendLine("<div  class=\"WebCount_QQ_Count\"></div>");
        //stb.AppendLine("<div class=\"WebCount_QQ_Count_list\"> 分站1个;纪念馆:8个;家族陵园:2个;网墓:2个;先祖宗祠:5个</div>");
        //stb.AppendLine("</div>");
        //stb.AppendLine("<div class=\"WebCount_right\"></div>");
        //stb.AppendLine("</div>");
        //stb.AppendLine("</div>");



        stb.Append("<table width=\"993\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"line_bottom10\">");
        stb.Append("<tr>");
        stb.Append("<td width=\"6\"><img src=\"" + configInfo.InstallDir + "images/info_left.jpg\" width=\"6\" height=\"37\"></td>");
        stb.Append("<td style=\"background:url(" + configInfo.InstallDir + "images/line4.jpg);\">");
        stb.Append("<div style=\"float:left\"><img src=\"" + configInfo.InstallDir + "images/oicq1.gif\" align=\"absmiddle\"></div>");
        stb.Append("<div style=\"float:left; width:370px;margin-top:8px;\">&nbsp;&nbsp;商务顾问1:&nbsp;<a target=blank href=tencent://message/?uin=844287119&Site=商务顾问1&Menu=yes><img border='0' SRC=http://wpa.qq.com/pa?p=1:844287119:4  alt='点击这里给我发消息'></a>&nbsp;&nbsp;商务顾问2:&nbsp;<a target=blank href=tencent://message/?uin=844303976&Site=商务顾问2&Menu=yes><img border='0' SRC=http://wpa.qq.com/pa?p=1:844303976:4  alt='点击这里给我发消息'></a>&nbsp;&nbsp;技术顾问:&nbsp;<a target=blank href=tencent://message/?uin=779505590&Site=技术顾问&Menu=yes><img border='0' SRC=http://wpa.qq.com/pa?p=1:779505590:4  alt='点击这里给我发消息'></a>&nbsp;&nbsp;</div>");
        stb.Append("<div style=\"float:left\"><img src=\"" + configInfo.InstallDir + "images/statistic.gif\"></div>");
        stb.Append("<div style=\"float:left; width:395px;margin-top:8px;\">&nbsp;&nbsp;分站<strong style='color:red'>" + GetPartsOfSiteNum() + "</strong>个;纪念馆:<strong style='color:red'>" + GetMemorialsNum() + "</strong>个;家族陵园:<strong style='color:red'>" + GetCemeteryNum() + "</strong>个;网墓:<strong style='color:red'>" + GetNetMuNum() + "</strong>个;先祖宗祠:<strong style='color:red'>" + GetAncestralHallsNum() + "</strong>个</div>");
        stb.Append("</td>");
        stb.Append("<td width=\"6\"><img src=\"" + configInfo.InstallDir + "images/info_right.jpg\" width=\"6\" height=\"37\"></td>");
        stb.Append("</tr>");
        stb.Append("</table>");
        return stb.ToString();
    }


    /// <summary>
    /// 网站底部友情链接
    /// </summary>
    /// <returns></returns>
    public virtual string UI_boot_Link()
    {
        StringBuilder stb = new StringBuilder();

        stb.AppendLine("<div class=\"topbanner bodyList\" >");
        stb.AppendLine("<div  class=\"bottom_Linkurl_995_text\">");
        stb.AppendLine("<ul>");

        int sum = 20;
        DataTable dt = ExcuteSqlTextBLL.GetDataTable("Select Top " + sum + " * from FriendSite Where  channel='' and  Typeid=0 and IsCheck=" + (int)IsTrueEnum.Yes + " and  LinkType=" + (int)LinkTypeEnum.text + " order by IsGood desc,Addtime desc");
        int n = 0;
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                stb.AppendLine(" <li><a href='" + dt.Rows[i]["SiteUrl"].ToString() + "' target='_blank'>" + dt.Rows[i]["SiteName"].ToString() + "</a></li>");
                n = i + 1;
            }

        }
        if (configInfo.IsLinkUrl == (int)IsTrueEnum.Yes)
        {

            for (int j = n; j < sum; j++)
            {
                stb.AppendLine("<li><a href='UserAddLink.Aspx?Action=txt' target='_linkblank' >欢迎加入</a></li>");
            }
        }

        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");

        stb.AppendLine("<div  class=\"bottom_Linkurl_995_pic\">");
        stb.AppendLine("<ul>");

        int picsum = 20;
        DataTable dtpic = ExcuteSqlTextBLL.GetDataTable("Select Top " + picsum + " * from FriendSite Where channel='' and  Typeid=0 and IsCheck=" + (int)IsTrueEnum.Yes + " and  LinkType=" + (int)LinkTypeEnum.pic + " order by IsGood desc,Addtime desc");

        int picn = 0;
        if (dtpic.Rows.Count > 0)
        {
            for (int pici = 0; pici < dtpic.Rows.Count; pici++)
            {
                stb.AppendLine("<li><a href='" + dtpic.Rows[0]["SiteUrl"].ToString() + "'target='_blank' ><img src=\"" + dtpic.Rows[0]["logoUrl"].ToString() + "\" /></a></li>");
                picn = pici + 1;
            }
        }

        if (configInfo.IsLinkUrl == (int)IsTrueEnum.Yes)
        {
            for (int picj = picn; picj < picsum; picj++)
            {
                stb.AppendLine("<li><a href='UserAddLink.Aspx?Action=pic' target='_linkblank'><img src=\"../images/nologo.jpg\" /></a></li>");
            }
        }

        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("</div>");




        //stb.AppendLine("<div style=\"padding-bottom:5px;\"></div>");
        //stb.AppendLine("<div style=\"width:993px;background:#F5F5F5;\" class=\"line_bottom10\"><table width='100%' cellSpacing='5'><tr align='center' class='tdbg'><td width='88'><a href='http://www.kfc88.com' target='_blank' title='网站名称：阿拉丁网址大全");
        //stb.AppendLine("网站地址：http://www.kfc88.com");
        //stb.AppendLine("网站简介：阿拉丁网址大全'><img src='http://www.kfc88.com/picture/88x31.gif' width='88' height='31' border='0'></a></td><td width='88'><a href='http://www.ganji.com/zhaopinhui/bjzhaopinhui/' target='_blank' title='网站名称：北京招聘会");
        //stb.AppendLine("网站地址：http://www.ganji.com/zhaopinhui/bjzhaopinhui/");
        //stb.AppendLine("网站简介：北京招聘会'><img src='http://gz.ganji.com/tpl/img/logo_ganji.jpg' width='88' height='31' border='0'></a></td><td width='88'><a href='http://pingdingshan.999qm.com/' target='_blank' title='网站名称：平顶山纪念网");
        //stb.AppendLine("网站地址：http://pingdingshan.999qm.com/");
        //stb.AppendLine("网站简介：平顶山纪念网'><img src='http://pingdingshan.999qm.com/image/logo/20081916461469669.jpg' width='88' height='31' border='0'></a></td><td width='88'><a href='http://www.jzptt.com' target='_blank' title='网站名称：锦州在线");
        //stb.AppendLine("网站地址：http://www.jzptt.com");
        //stb.AppendLine("网站简介：锦州在线'><img src='http://www.jzptt.com/images/logo.gif' width='88' height='31' border='0'></a></td><td width='88'><a href='http://www.ss-jz.com' target='_blank' title='网站名称：单氏家族宗亲网");
        //stb.AppendLine("网站地址：http://www.ss-jz.com");
        //stb.AppendLine("网站简介：家族'><img src='http://www.ss-jz.com/zqcindex.files/title.gif' width='88' height='31' border='0'></a></td><td width='88'><a href='http://www.guzhenu.com/Index.html' target='_blank' title='网站名称：中国古镇旅游网");
        //stb.AppendLine("网站地址：http://www.guzhenu.com/Index.html");
        //stb.AppendLine("网站简介：旅游网'><img src='http://www.guzhenu.com/images/logo.gif' width='88' height='31' border='0'></a></td><td width='88'><a href='http://www.mxj8.com' target='_blank' title='网站名称：梦想家免费网");
        //stb.AppendLine("网站地址：http://www.mxj8.com");
        //stb.AppendLine("网站简介：网址大全，上网导航，无条件收录网址。'><img src='http://www.mxj8.com/images/logo.gif' width='88' height='31' border='0'></a></td><td width='88'><a href='FriendSiteReg.asp' target='_blank'><img src='images/nologo.jpg' width='88' height='31' border='0' alt='点击申请'></a></td></tr></table></div>");
        return stb.ToString();
    }

    /// <summary>
    /// 会员中心用户登录成功
    /// </summary>
    /// <returns></returns>
    public virtual string UI_Users_loginOK()
    {

        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"Member_lgoinOk\">");
        stb.AppendLine("<div class=\"member_LoginTop\"></div>");
        stb.AppendLine("<div class=\"member_loginCenterBg\">");
        stb.AppendLine("<div class=\"login_ok_info   UserLeftDHTA  \">");
        stb.AppendLine("欢迎您，<strong class=\"green\">" + Base_GetLoginInfo.GetUserName + "</strong>！&nbsp;&nbsp;&nbsp;<a href=\"" + configInfo.InstallDir + "Users/LoginOut.Aspx\" >[注销]</a><br />");
        stb.AppendLine("在线时长： <strong class=\"blown\">" + StringHelper.FromatOnlineTime(Base_GetUserInfo.OnlineTime.ToString()) + "</strong><br />");
        stb.AppendLine("可用积分： <a href='" + configInfo.InstallDir + "Users/ScoreExchangePoint.aspx'><strong class=\"blown\">" + Base_GetUserInfo.Integral.ToString("#.##") + "</strong></a> 分<br />");
        stb.AppendLine("可用点数： <a href='" + configInfo.InstallDir + "Users/ConsumptionRecord.aspx'><strong class=\"blown\">" + Base_GetUserInfo.Point.ToString("0.##") + "</strong></a> 点<br />");
        stb.AppendLine("</div> ");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_Loginbottom\"></div>");
        stb.AppendLine("</div>");
        return stb.ToString();
    }

    /// <summary>
    /// 会心中心导航条
    /// </summary>
    /// <returns></returns>
    public virtual string UI_UsersDhtList()
    {
        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"member_lgoindht\">");
        stb.AppendLine("<div class=\"member_dht_Top\">纪念馆管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"Create_memorial.Aspx\">创建新的纪念馆</a></li>");
        stb.AppendLine("<li class=\"UserLeftDHTA\" ><a href=\"memorial_List.Aspx\">我创建的纪念馆</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_dht_Top\">公墓管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"CreateNetMu.aspx\">创建新的公墓</a></li>");
        stb.AppendLine("<li class=\"UserLeftDHTA\"><a href=\"NetMuList.aspx\">我创建的公墓</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");

        stb.AppendLine("<div class=\"member_dht_Top \">宗祠管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"CreateAncestralHall.aspx\">创建新的宗祠</a></li>");
        stb.AppendLine("<li  class=\"UserLeftDHTA\"><a href=\"AncestralHallList.aspx\">我创建的宗祠</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");



        stb.AppendLine("<div class=\"member_dht_Top \">家族陵园管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"Create_Cemetery.Aspx\">创建新的陵园</a></li>");
        stb.AppendLine("<li class=\"UserLeftDHTA\"><a href=\"Cemetery_List.Aspx\">我创建的陵园</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");

        stb.AppendLine("<div class=\"member_dht_Top \">海内外寻亲管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"FindFamilyList.aspx\">海内外寻亲管理</a></li>");
        stb.AppendLine("<li class=\"UserLeftDHTA\"><a href=\"CreateFindFamily.aspx\">添加海内外寻亲</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");

        stb.AppendLine("<div class=\"member_dht_Top \">宠物乐园管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"HappyPetList.aspx\">宠物乐园管理</a></li>");
        stb.AppendLine("<li class=\"UserLeftDHTA\"><a href=\"CreateHappyPet.aspx\">添加宠物乐园</a></li> ");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<script src=\"../Script/popup.js\"></script>");
        stb.AppendLine("<div class=\"member_dht_Top\">用户信息管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"MyInfo.Aspx\">个人信息</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"EditPwd.Aspx\">修改密码</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\">宠物乐园管理 | 添加</li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"#\" onclick=\"wy_addPhotoCat('SendMessage.aspx','发短消息',700,520);return false;\"  >发短消息</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ReciveMessagesManage.aspx\">收件箱</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"MessagesManage.aspx\">发件箱</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ConsumptionRecord.aspx\">消费记录</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ScoreRecord.aspx\">积分记录</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ScoreExchangePoint.aspx\">积分兑换</a></li>");

        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"#\" onclick=\"wy_addPhotoCat('" + configInfo.InstallDir + "OnlineAddPoint.aspx','在线充值',700,250);return false;\">在线充值</a></li>");

        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_dht_List_bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/LoginOut.Aspx\">注销登录</a></div>");
        stb.AppendLine("</div>");


        return stb.ToString();
    }

    /// <summary>
    /// 纪念馆管理的导航条
    /// </summary>
    /// <returns></returns>
    public virtual string UI_memorialMangerNav(int id)
    {
        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"member_lgoindht\">");

        stb.AppendLine("<div class=\"member_dht_Top\">纪念馆管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"memorial_master_" + id + ".Aspx\">该馆信息</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"EditMemorial_" + id + ".Aspx\">信息修改</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/ArticleList_" + id + "_" + (int)Channel_Type.memorial + "_1.Aspx\">纪念文选</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"PostPhoto_" + id + ".Aspx\">历史相册</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/ArticleList_" + id + "_" + (int)Channel_Type.memorial + "_2.Aspx\">人物事迹</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"decedent_works_" + id + ".aspx\">人物作品</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"SelectMemorialTemplate_" + id + ".aspx\">模板选择</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"UserLinksList_" + id + ".Aspx\">友情链接</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"default.Aspx\">返回会员中心</a></li>");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_dht_List_bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/LoginOut.Aspx\">注销登录</a></div>");
        stb.AppendLine("</div>");


        return stb.ToString();
    }


    /// <summary>
    /// 公墓管理的导航条
    /// </summary>
    /// <returns></returns>
    public virtual string UI_NetMuMangerNav(int id)
    {
        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"member_lgoindht\">");

        stb.AppendLine("<div class=\"member_dht_Top\">公墓管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"NetMuManage_" + id + ".Aspx\">该公墓信息</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"EditNetMu_" + id + ".Aspx\">信息修改</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ArticleList_" + id + "_" + (int)Channel_Type.gravestone + "_1.Aspx\">纪念文选</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"NetMuPostPhoto_" + id + ".Aspx\">历史相册</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"ArticleList_" + id + "_" + (int)Channel_Type.gravestone + "_2.Aspx\">人物事迹</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"NetMuPostPersonPhoto_" + id + ".Aspx\">人物作品</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"SelectNetMuTemplate_" + id + ".Aspx\">模板选择</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"MuLinksList_" + id + ".Aspx\">友情链接</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"default.Aspx\">返回会员中心</a></li>");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_dht_List_bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/LoginOut.Aspx\">注销登录</a></div>");
        stb.AppendLine("</div>");


        return stb.ToString();
    }


    /// <summary>
    /// 宗祠管理的导航条
    /// </summary>
    /// <returns></returns>
    public virtual string UI_AncestralHallMangerNav(int id)
    {
        StringBuilder stb = new StringBuilder();
        stb.AppendLine("<div class=\"member_lgoindht\">");

        stb.AppendLine("<div class=\"member_dht_Top\">宗祠管理</div>");
        stb.AppendLine("<div class=\"member_dht_List_center\">");
        stb.AppendLine("<ul>");
        stb.AppendLine("<li  class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AddAncestralHallBackMusic_" + id + ".Aspx\">背景音乐设置</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"UpdateAncestralHall_" + id + ".Aspx\">信息修改</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AncestralHallBBSTop_" + id + ".Aspx\">顶部设置</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AncestralHallBBSBottom_" + id + ".Aspx\">底部设置</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AncestralHallItemsList_" + id + ".Aspx\">版块管理</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AddAncestralHallItems_" + id + ".Aspx\">版块添加</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AncestralHallSkins_" + id + ".Aspx\">宗祠模板选择</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"AncestralLinksList_" + id + ".Aspx\">友情链接</a></li>");
        stb.AppendLine("<li class=\"Userleft_border-bottom UserLeftDHTA\"><a href=\"default.Aspx\">返回会员中心</a></li>");
        stb.AppendLine("</ul>");
        stb.AppendLine("</div>");
        stb.AppendLine("<div class=\"member_dht_List_bottom UserLeftDHTA\"><a href=\"" + configInfo.InstallDir + "Users/LoginOut.Aspx\">注销登录</a></div>");
        stb.AppendLine("</div>");


        return stb.ToString();
    }

    /// <summary>
    /// 获得分站的二级域名(如果没有代理商返回用系统的根目录)
    /// </summary>
    /// <param name="province">省</param>
    /// <param name="city">城市</param>
    /// <returns></returns>
    public string GetTwoDnsDirect(int province, int city)
    {
        AgentModel AgMd = Agen_BLL.CreateNew.GetModel(" LoginCity=" + city + " and LoginPro=" + province + " ");

        string url = "http://{0}.web." + configInfo.DnsUrl + "/";
        string agentName = "";
        if (AgMd.Id > 0)
        {
            agentName = AgMd.AgentUserName;
            url = string.Format(url, agentName);
        }
        else
        {
            url = configInfo.SiteUrl;
        }
        return url;
    }
    #endregion
}
